package service.serviceImpl;

import dao.CourseStudentDao;
import dao.Impl.CourseStudentDaoImpl;
import po.Course;
import po.CourseStudent;
import service.CourseStudentService;

import java.util.ArrayList;
import java.util.List;

public class CourseStudentServiceImpl implements CourseStudentService {
    private CourseStudentDao dao=new CourseStudentDaoImpl();
    @Override
    public void insert(CourseStudent courseStudent) {
        dao.insert(courseStudent);
    }

    @Override
    public void delete(CourseStudent courseStudent) {
        dao.delete(courseStudent);
    }

    @Override
    public Integer haveChooseNumber(Integer id) {
        Integer integer = dao.haveChooseNumber(id);
        return integer;
    }

    @Override
    public boolean ifHaveChoose(Integer cid, Integer sid) {
        return dao.ifHaveChoose(cid, sid);
    }


    @Override
    public CourseStudent queryOneCourseStudent(Integer cid, Integer sid) {
        CourseStudent courseStudent = dao.queryOneCourseStudent(cid, sid);
        return  courseStudent;
    }



}
